public class Records {

    private String hash;
    private String time;
    private int id;

    private String node;

    //是否是head
    private boolean isHead=false;
    //getter和setter
    public boolean isHead() {
        return isHead;
    }
    public void setHead(boolean head) {
        isHead = head;
    }


    public Records() {
    }

    public Records(String hash, String time, int id, String node) {
        this.hash = hash;
        //对Time进行处理
        //如果time包含+
        if(time.contains("+")){
            //去除+后面所有东西
            time = time.substring(0,time.indexOf("+"));
        }
        //去除前置空格
        time = time.trim();
        this.time = time;
        this.id = id;
        this.node = node;
    }

    /**
     * 获取
     * @return hash
     */
    public String getHash() {
        return hash;
    }

    /**
     * 设置
     * @param hash
     */
    public void setHash(String hash) {
        this.hash = hash;
    }

    /**
     * 获取
     * @return time
     */
    public String getTime() {
        return time;
    }

    /**
     * 设置
     * @param time
     */
    public void setTime(String time) {
        this.time = time;
    }

    /**
     * 获取
     * @return id
     */
    public int getId() {
        return id;
    }

    /**
     * 设置
     * @param id
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * 获取
     * @return node
     */
    public String getNode() {
        return node;
    }

    /**
     * 设置
     * @param node
     */
    public void setNode(String node) {
        this.node = node;
    }

    public String toString() {
        return "Records{hash = " + hash + ", time = " + time + ", id = " + id + ", node = " + node + "}";
    }

}
